package com.mtnz.njk.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
* @Description:    代金券类型实体
* @Author:         FBL
* @CreateDate:     2019\8\16 0016 8:28
* @Version:        1.0
*/
@Data
@Table(name = "coupon_type")
public class CouponTypeEntity {
    @Id
    @Column(name = "coupon_type_id")
    private Integer couponTypeId;
    @Column(name = "sub_max_money")
    private Integer subMaxMoney;
    @Column(name = "sub_money")
    private Integer subMoney;
    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @Column(name = "end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    @Column(name = "coupon_img")
    private String couponImg;
    @Column(name = "coupon_explain")
    private String couponExplain;
    @Column(name = "del_flag")
    private Integer delFlag;

    @Transient
    private List<ProductEntity> productEntities;
    // 编辑用，以前的商品id集合
    @Transient
    private List<String> oldProductIds;


}
